﻿<?php
include 'lanewechat.php';
$userinfo = \LaneWeChat\Core\Common::getCurrentUserInfo( 'spendDetail.php' );
$info = \LaneWeChat\Core\Common::getCurrentCardInfo( $userinfo['openid'] );
$detail = \LaneWeChat\Core\Common::getReportDetail( $userinfo['openid'] , $_GET['num'] );
?>
<!DOCTYPE html>
<html>
<head>
    <title>鹏企科技</title>
    <meta name="keywords" content="鹏企科技">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1,initial-scale=1.0, maximum-scale=1.0,user-scalable=0">
    <meta name="renderer" content="webkit">
    <link rel=Stylesheet type="text/css" href="css/common.css">
    <link rel=Stylesheet type="text/css" href="css/style.css">
</head>

<body>


<div class="container">

    <div class="header"><img src="images/arrow.png">消费信息</div>

    <div class="container2 count">
        <p>账户余额（元）<font><?=$info['SumCash']/100?></font></p>
        <p>账户余次（次）<font>0</font></p>
    </div>

    <div class="container2 spend-info">
        <p><span>交易时间：</span><?=$_GET['time'];?></p>
        <p><span>交易类型：</span>消费</p>
        <p><span>消费金额：</span><font><?=$_GET['money'];?></font>元</p>
    </div>

    <div class="spend">
        <table width="100%" border="0" cellspacing="0" cellpadding="0">
		  <?php
				$allCount=0;
                foreach( $detail['data'] as $key => $row ){
                    if( $key == 0 ) continue;
                    ?><tr><?php $allCount += $row[2];foreach ($row as $r){
						
                        if( $r == 'SN' ) $r='序号';
                        ?><td style="width:25%;"><?=mb_substr($r,0,10);?></td><?php } ?></tr><?php
                }

            ?>
            <tr>
                <td >合计</td>
                <td ></td>
                <td ><?=$allCount;?></td>
                <td ><?=$_GET['money'];?></td>
            </tr>
            
        </table>
    </div>

    <div class="lk-click"><a href="#">点击查看您今日的营养摄入情况  </a></div>

</div>


<div class="footer"><img src="images/logo.png">本服务由上海鹏企自动化科技有限公司提供</div>

</div>



<script type="text/javascript" src="js/jquery-2.1.1.min.js"></script>
<script type="text/javascript">
    $('.recharge-sel a').click(function(){
        $('.recharge-sel a').removeClass('on');
        $(this).addClass('on');
    });
</script>
</body>
</html>
